﻿/*************************
 * 
 * by wzj 20130425
 * 
 * 中奖算法
 * 
 * 
 * 
 * 
 * */
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Leefish.Market.PRO.Entity;
using JCW.Common;
using System.Threading;

namespace Leefish.Market.PRO.BLL
{
    
    public class BzMainBL
    {
       
        public BzMainBL()
        { 
        }

        public static BzWinBLL Get(string nick){
            BzWinBLL bz;
            //判断是否在缓存中存在
            if (CacheHelper.Exists(nick))
            {
                CacheHelper.Get<BzWinBLL>(nick, out bz);
            }
            else {
                EnRoller en = BzRoller.Get(nick);
                if (en != null)
                {
                    IList<EnAward> list = BzAward.Get(nick);
                    en.ListAward = list as List<EnAward>;
                    bz = new BzWinBLL(en);
                    CacheHelper.Insert<BzWinBLL>(bz, nick, 60);
                }
                else {
                    bz = null;
                }
            }
            return bz;
        }
    }
}
